#include <bits/stdc++.h>
using namespace std;
#define int long long
int mod=998244353;
int sum;
int qpow(int a,int n)
{
    int ret=1;
    while(n)
    {
        if(n&1)ret=ret*a%mod;
        a=a*a%mod;
        n>>=1;
    }
    return ret;
}
vector<long long> fac,ifac;
int C(int n,int m)
{
    return fac[n]*ifac[m]%mod*ifac[n-m]%mod;
}
void solve()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int sum=a+b+c+d;
    int ans=0;
    ifac=fac=vector<long long> (sum+1);
    fac[0] = 1;
    for(int i = 1; i <= sum; i++){
        fac[i] = fac[i-1] * i % mod;
    }
    ifac[sum]=qpow(fac[sum],mod-2);
    for(int i = sum; i >0; i--){
        ifac[i-1] = ifac[i] * i % mod;
    }
    for(int i=0;i<=c;i++)
    {
        int x=C(a+b+i,b);
        int y=C(c+d-1-i,c-i);
        ans=(ans+(x*y))%mod;
    }
    cout<<ans;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}